from django.urls import path
from iot_api.views import CabinetListView, CabinetPointView, WarnLimitView, PointLimitView, PointDetailView, \
    OnlineCountView, WarnCountView, WarnCabinetView, WarnCabinetSortView, WarnPointSortView, WarnPointLineView, \
    RoomView, RoomDetailView, CabinetDetailView, GradationCompareView, GradationView, CompareABCView, \
    WarnHistoryLineView, WarnHistoryTableView, VDetailView, IsHandelView, WarnEquipmentView, AppletCabinetView, \
    AppletWarnNowViews, AppletWarnHistoryTableView, WarnToExcel, RoleView, DeptView, CreateUserView, UpdateUserView, \
    VDeviceListView, DeviceEnergyDetailView, EnergyTimeView, ELEDeviceDetailView, test

urlpatterns = []
# 主页面接口
urlpatterns += [
    path('cabinets/', CabinetListView.as_view()),
    path('cabinet/points/', CabinetPointView.as_view()),
    path('points/list/', PointLimitView.as_view()),
    path('warns/list/', WarnLimitView.as_view()),
    path('point/detail/', PointDetailView.as_view()),
    path('online/count/', OnlineCountView.as_view()),
    path('warn/count/', WarnCountView.as_view()),
    path('warn/early_warn/count/', WarnCabinetView.as_view()),
    path('warn/cabinet/sort/', WarnCabinetSortView.as_view()),
    path('warn/point/sort/', WarnPointSortView.as_view()),
    path('warn/point/line/', WarnPointLineView.as_view()),
    path('rooms/', RoomView.as_view()),
    path('room/details/', RoomDetailView.as_view()),
    path('cabinet/details/', CabinetDetailView.as_view()),
    path('cabinet/ABC/', GradationCompareView.as_view()),
    path('cabinet/gradations/', GradationView.as_view()),
    path('cabinet/ABC/compare/', CompareABCView.as_view()),
    path('warn/history/line/', WarnHistoryLineView.as_view()),
    path('warn/history/table/', WarnHistoryTableView.as_view()),
    path('voltage/detail/', VDetailView.as_view()),
    path('temp/is_handel/', IsHandelView.as_view()),
    path('warn/warning/', WarnEquipmentView.as_view()),
    path('applet/cabinets/', AppletCabinetView.as_view()),
    path('applet/now/warns/', AppletWarnNowViews.as_view()),
    path('applet/warn/history/', AppletWarnHistoryTableView.as_view()),
    path('download/', WarnToExcel.as_view()),
    # path('roles/', RoleView.as_view()),
    # path('depts/', DeptView.as_view()),
    path('create/user/', CreateUserView.as_view()),
    path('update/user/', UpdateUserView.as_view()),

    # 抄表
    path('ele/device/list/', VDeviceListView.as_view()),  # 设备列表
    path('ele/device/day/detail/', DeviceEnergyDetailView.as_view()),    # 日能耗一览
    path('ele/time/type/', EnergyTimeView.as_view()),    # 时间维度
    path('ele/device/time/type/detail/', ELEDeviceDetailView.as_view()),    # 抄表数据
    path('air/', test.as_view()),    # 抄表数据
]
